/*
Hermes Core: General Purpose Mobile Agent Platform
Copyright (C) 2006 UNICAM - Università degli Studi di Camerino

Group leaders: Flavio Corradini and Emanuela Merelli

Developers: Ezio Bartocci, Diego Bonura, Rosario Culmone,
Davide Lorenzoli, Leonardo Mariani, Francesca Piersigilli, 
Lorenzo Scortichini, Leonardo Vito.

GNU Lesser Public License

This library is free software; you can redistribute it 
and/or modify it under the terms of the GNU Lesser General 
Public License as published by the Free Software Foundation, 
version 2.1 of the License.

This library is distributed in the hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public 
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.

Emanuela Merelli
Dipartimento di Matematica ed Informatica
Università di Camerino
via Madonna delle Carceri, 62032 Camerino, Italy
E.Mail: emanuela.merelli@unicam.it
*/
package hermesV2.basicServices.discovery;

import hermesV2.agent.AbstractProtocol;
import hermesV2.agent.Identificator;


/**
 * It is the interface of the discovery component that offers to the service
 * agents  the possibility to be registered into the place.
 *
 * @author Diego Bonura
 */
public interface Update {

    /**
     * Sets a service agent identificator into the component.
     *
     * @param id The Service Agent Identificator
     * @param keyWordsArray An array of string that contains the description of
     *        the services.
     * @param propagate True the registration is propagate on the network False is only local
     */
    public void setService(Identificator id, String[] keyWordsArray, boolean propagate);
    
    /**
     * This method erases the registration of the service agent from the
     * discovery component.
     *
     * @param id The identificator of the service agent that has to be erased.
     */
    public void eraseService(Identificator id);
    
    /**
     * Sets the protocol of a  service agent into the component.
     *
     * @param id The Service Agent Identificator
     * @param protocol The protocol of the services.
     */
    public void setServiceProtocol(Identificator id, AbstractProtocol protocol);
    /**
     * This method erases the protocol of the service agent from the
     * discovery component.
     *
     * @param id The identificator of the service agent that has to be erased.
     */
    public void eraseServiceProtocol(Identificator id);
}
